package org.lightpersist.interceptor;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class DoubleInterceptor implements MethodInterceptor {

	public Object invoke(MethodInvocation invocation) throws Throwable {
		Object obj = invocation.proceed();
//		if(!(invocation.getThis() instanceof MyService))
//			return obj;
		if(obj==null)
			return "DoubleNull";
		if(obj instanceof String)
			return (String)obj+obj;
		return obj;
	}

}
